home *** CD-ROM | disk | FTP | other *** search
- #ifndef TIMERS_H
- #define TIMERS_H
-
- typedef unsigned long ULONG;
-
- class TIMER
- {
- public:
- TIMER(int EventId);
- virtual ~TIMER();
- int Start(ULONG Interval);
- void Stop();
- virtual void Fire() = 0;
-
- int EventId;
- ULONG Interval;
- ULONG ThisTime;
- ULONG LastTime;
-
- static void InitTimerPackage(HANDLE Instance);
- static int OutOfTimers();
-
- friend int ReviseInterval();
- friend void InitTimer(TIMER *Timer, int EventId);
- friend void DeleteTimer(TIMER *Timer);
- friend WORD FAR PASCAL TimerCallBack(HWND,
- WORD, WORD, LONG);
- private:
- TIMER *Next;
- };
-
- #endif
-